package com.ruoyi.bizsys.service;

import java.util.List;

import com.ruoyi.bizsys.domain.LoanOrder;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.bizsys.domain.ProductInfo;
import org.apache.ibatis.annotations.Param;
import com.ruoyi.bizsys.domain.SmsTask;
import com.ruoyi.bizsys.vo.LoanOrderVo;

/**
 * 借款申请Service接口
 *
 * @author african-loan
 * @date 2021-12-30
 */
public interface ILoanOrderService extends IService<LoanOrder> {
    /**
     * 查询借款申请
     *
     * @param id 借款申请ID
     * @return 借款申请
     */
    public LoanOrder selectLoanOrderById(Long id);

    /**
     * 查询借款申请列表
     *
     * @param loanOrder 借款申请
     * @return 借款申请集合
     */
    public List<LoanOrder> selectLoanOrderList(LoanOrder loanOrder);

    public List<LoanOrder> getList(LoanOrder loanOrder);

    /**
     * 新增借款申请
     *
     * @param loanOrder 借款申请
     * @return 结果
     */
    public int insertLoanOrder(LoanOrder loanOrder);

    /**
     * 修改借款申请
     *
     * @param loanOrder 借款申请
     * @return 结果
     */
    public int updateLoanOrder(LoanOrder loanOrder);

    /**
     * 批量删除借款申请
     *
     * @param ids 需要删除的借款申请ID
     * @return 结果
     */
    public int deleteLoanOrderByIds(Long[] ids);

    /**
     * 删除借款申请信息
     *
     * @param id 借款申请ID
     * @return 结果
     */
    public int deleteLoanOrderById(Long id);

    List<LoanOrder> getReturnRunLoanData(Integer andonTaskMinute);

    int isBiggerByCustNo(String custNo, String loanSerialNo);

    List<LoanOrderVo> selectLoanOrder();

    List<LoanOrderVo> selectLoanOrderPending();

    int updateBatch(List<LoanOrder> loanOrders);

    LoanOrder getOneByCustNo(String custNo);

    int countByLoanSerialNo(String loanSerialNo);

    /**
     * 今日总数
     * @param custNo
     * @param loanStatus
     * @return
     */
    int todayCountByStatus(String custNo,int ... loanStatus);

    LoanOrder getOneBySerialNo(String applySerialNo);

    LoanOrder pessimisticLockById(long id);

    LoanOrder getOneByPayTransSerialNo(String payTransSerialNo);

    ProductInfo selectLoanOrderProduct(String custNo);
}
